package com.yan.exceptiontest;
/*     10000 - 1000000
      9   9   9   9    9
      万  千  百   十   个
*/
import java.util.Random;

public class Test8 {
    public static void main(String[] args) {
        int num = new Random().nextInt(90000) + 10000;
        System.out.println(num);
        int[] arr = new int[5];
        for (int i = arr.length - 1; i >= 0; i--) {
            arr[i] = num % 10;
            num = num / 10;
        }
        int temp = arr[0];
        arr[0] = arr[4];
        arr[4] = temp;
        temp = arr[1];
        arr[1] = arr[3];
        arr[3] = temp;
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]);
        }

    }


}
